<% layout('/layouts/default.html', {title: '销售统计管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('销售统计管理')}
			</div>
			<div class="box-tools pull-right">

			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${salesRecords}" action="${ctx}/phone/salesRecords/manufacturerQuarterlistData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">年份：</label>
					<div class="control-inline">
						<#form:input path="yrars" maxlength="11" class="form-control width-120"/>
						<#form:input path="quarters" maxlength="11" class="form-control width-120"/>
					</div>
				</div>
			<div class="form-group">
				<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
				<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
			</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'厂家名称', name:'productManufacturer', index:'m.productManufacturer', width:150, align:"center", frozen:true},
		{header:'季度', name:'quarters', index:'m.quarters', width:150, align:"center", frozen:true},
		{header:'本季度进货总金额', name:'totalPrice', index:'m.total_price', width:150, align:"center", frozen:true},
		{header:'本季度进货总数量', name:'number', index:'a.number', width:150, align:"center"},
		{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('phone:phoneCommodity:edit')){ %>
					actions.push('<a href="${ctx}/phone/salesRecords/commodityQuarterlist?quarters='+row.quarters+'&yrars='+row.yrars+'&productManufacturerId='+row.productManufacturerId+'" class="btnList" title="${text('查看销售商品记录')}"><i class="icon-login"></i></a>&nbsp;');
			<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>